package www.ld.com.converter;

import cn.hutool.core.util.StrUtil;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

@Component
public class StringTOLongConverter implements Converter<String,Long> {
    @Override
    public Long convert(String source) {
        if(StrUtil .isBlank(source) ) return null;
        if(StrUtil.equals("0",source)) return null;
        return Long.valueOf(source);
    }
}
